﻿/*
--------------------------------------
File: KMeans_Cluster.cs
Project: Themaopdracht 7
Author: Lars Hartmann

Description:
Support class for the KMeans algorithm
--------------------------------------
*/

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;

namespace THO7_Team8
{
	public class KMeans_Cluster
	{
		private int r, g, b, nr, size;
		private Color color;

		public KMeans_Cluster(int r, int g, int b, int nr)
		{
			this.r = r;
			this.g = g;
			this.b = b;
			this.nr = nr;
			size = 0;

			color = Color.FromArgb(r, g, b);
		}

		public override string ToString()
		{
			return "=======\nCluster:	" + nr + "\n" +
				"Red:	" + r + "\nGreen:	" + g + "\nBlue:	" + b + "\nSize:	" + size;
		}

		public Color getColor()
		{
			return color;
		}

		public int getR()
		{
			return r;
		}

		public int getG()
		{
			return g;
		}

		public int getB()
		{
			return b;
		}

		public int getNr()
		{
			return nr;
		}

		public int getSize()
		{
			return size;
		}

		public void sizeReset()
		{
			size = 0;
		}

		public void sizeIncr()
		{
			size++;
		}

		public void setColor(int r, int g, int b)
		{
			this.r = r;
			this.g = g;
			this.b = b;

			color = Color.FromArgb(r, g, b);
		}
	}
}